﻿using CommonEntity;
using Microsoft.AspNetCore.Mvc;
using NetCroe6WebAPITestOneBusiness;
using System.ComponentModel.DataAnnotations;

namespace NetCroe6WebAPITestOne.Controllers
{
    [ApiController]
    [Route("RabbitMQTest")]
    public class RabbitMQTestController:ControllerBase
    {
        RabbitMQTestBusiness rabbitMQTestBusiness;

        public RabbitMQTestController(RabbitMQTestBusiness rabbitMQTestBusiness)
        {
            this.rabbitMQTestBusiness = rabbitMQTestBusiness;
        }

        /// <summary>
        /// 消息发送
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        [HttpGet("SendMessage")]
        public ViewModelBase SendMessage([Required]string message) { 
            return rabbitMQTestBusiness.SendMessage(message);
        }
    }
}
